import pygame,sys,os
from Move_img import Move_img
class Door_Person(Move_img):
    def __init__(self, door_x, door_y):
        self.image = pygame.image.load(self.resource_path("source/img/door_person.png"))
        super().__init__(self.image,door_x,door_y,True)
    def resource_path(self,relative_path):
        """ 根据打包后的环境动态加载资源路径 """
        if hasattr(sys, '_MEIPASS'):
            base_path = sys._MEIPASS
        else:
            base_path = os.path.abspath(".")
        return os.path.join(base_path, relative_path)
